<div class="bjui-pageHeader">
    <form id="pagerForm" data-toggle="ajaxsearch" action="{{url('admin/role')}}" method="get">
        <input type="hidden" name="_token" value="{{ csrf_token() }}">
        <input type="hidden" name="page" value="{{$roles->currentPage()}}">
        <input type="hidden" name="orderField" value="{{$request->input('orderField', 'created_at')}}">
        <input type="hidden" name="orderDirection" value="{{$request->input('orderDirection', 'desc')}}">

        {{--<div class="bjui-searchBar">--}}
            {{--<label>名称：</label><input name="name" size="10" value="{{$request->input('name')}}">--}}
            {{--<button type="submit" class="btn-default" data-icon="search">查询</button>--}}
            {{--&nbsp;--}}
            {{--<a class="btn btn-orange" href="javascript:;" onclick="$(this).navtab('reloadForm', true);"--}}
               {{--data-icon="undo">清空查询</a>--}}
        {{--</div>--}}
    </form>
</div>
<div class="bjui-pageContent">
    <table data-toggle="tablefixed" data-width="100%" data-nowrap="true">
        <thead>
        <tr>
            <th width="40">id</th>
            <th>名称</th>
            <th>创建时间</th>
            <th>管理员</th>
            <th width="100">操作</th>
        </tr>
        </thead>
        <tbody>
        @foreach($roles as $role)
            <tr data-id="{{$role->id}}">
                <td>{{$role->id}}</td>
                <td>{{$role->name}}</td>
                <td>{{$role->created_at}}</td>
                <td>@if($role->is_admin)是@endif</td>
                <td>
                </td>
            </tr>
        @endforeach
        </tbody>
    </table>
</div>
<div class="bjui-pageFooter">
    <div class="pages">
        <span>每页{{config('view')['numPerPage']}}条，共 {{$roles->total()}} 条</span>
    </div>
    <div class="pagination-box" data-toggle="pagination" data-total="{{$roles->total()}}" data-page-size="{{config('view')['numPerPage']}}"
         data-page-current="{{$roles->currentPage()}}"></div>
</div>